3.5 \(\int \frac{\sin (a+b \log (c x^n))}{x^2} \, dx\)

Optimal. Leaf size=57 \[ -\frac{\sin \left (a+b \log \left (c x^n\right )\right )}{x \left (b^2 n^2+1\right )}-\frac{b n \cos \left (a+b \log \left (c x^n\right )\right )}{x \left (b^2 n^2+1\right )} \]

[Out]

-((b*n*Cos[a + b*Log[c*x^n]])/((1 + b^2*n^2)*x)) - Sin[a + b*Log[c*x^n]]/((1 + b^2*n^2)*x)

________________________________________________________________________________________

Rubi [A]  time = 0.0178563, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {4485} \[ -\frac{\sin \left (a+b \log \left (c x^n\right )\right )}{x \left (b^2 n^2+1\right )}-\frac{b n \cos \left (a+b \log \left (c x^n\right )\right )}{x \left (b^2 n^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*Log[c*x^n]]/x^2,x]

[Out]

-((b*n*Cos[a + b*Log[c*x^n]])/((1 + b^2*n^2)*x)) - Sin[a + b*Log[c*x^n]]/((1 + b^2*n^2)*x)

Rule 4485

Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)], x_Symbol] :> Simp[((m + 1)*(e*x)^(m +
 1)*Sin[d*(a + b*Log[c*x^n])])/(b^2*d^2*e*n^2 + e*(m + 1)^2), x] - Simp[(b*d*n*(e*x)^(m + 1)*Cos[d*(a + b*Log[
c*x^n])])/(b^2*d^2*e*n^2 + e*(m + 1)^2), x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b^2*d^2*n^2 + (m + 1)^2,
 0]

Rubi steps

\begin{align*} \int \frac{\sin \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx &=-\frac{b n \cos \left (a+b \log \left (c x^n\right )\right )}{\left (1+b^2 n^2\right ) x}-\frac{\sin \left (a+b \log \left (c x^n\right )\right )}{\left (1+b^2 n^2\right ) x}\\ \end{align*}

Mathematica [A]  time = 0.0582826, size = 40, normalized size = 0.7 \[ -\frac{\sin \left (a+b \log \left (c x^n\right )\right )+b n \cos \left (a+b \log \left (c x^n\right )\right )}{b^2 n^2 x+x} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*Log[c*x^n]]/x^2,x]

[Out]

-((b*n*Cos[a + b*Log[c*x^n]] + Sin[a + b*Log[c*x^n]])/(x + b^2*n^2*x))

________________________________________________________________________________________

Maple [F]  time = 0.036, size = 0, normalized size = 0. \begin{align*} \int{\frac{\sin \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) }{{x}^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*ln(c*x^n))/x^2,x)

[Out]

int(sin(a+b*ln(c*x^n))/x^2,x)

________________________________________________________________________________________

Maxima [B]  time = 1.23783, size = 282, normalized size = 4.95 \begin{align*} -\frac{{\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \cos \left (b \log \left (c\right )\right )\right )} n + \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + \sin \left (b \log \left (c\right )\right )\right )} \cos \left (b \log \left (x^{n}\right ) + a\right ) -{\left ({\left (b \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \sin \left (b \log \left (c\right )\right )\right )} n - \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) - \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) - \cos \left (b \log \left (c\right )\right )\right )} \sin \left (b \log \left (x^{n}\right ) + a\right )}{2 \,{\left ({\left (b^{2} \cos \left (b \log \left (c\right )\right )^{2} + b^{2} \sin \left (b \log \left (c\right )\right )^{2}\right )} n^{2} + \cos \left (b \log \left (c\right )\right )^{2} + \sin \left (b \log \left (c\right )\right )^{2}\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))/x^2,x, algorithm="maxima")

[Out]

-1/2*(((b*cos(2*b*log(c))*cos(b*log(c)) + b*sin(2*b*log(c))*sin(b*log(c)) + b*cos(b*log(c)))*n + cos(b*log(c))
*sin(2*b*log(c)) - cos(2*b*log(c))*sin(b*log(c)) + sin(b*log(c)))*cos(b*log(x^n) + a) - ((b*cos(b*log(c))*sin(
2*b*log(c)) - b*cos(2*b*log(c))*sin(b*log(c)) + b*sin(b*log(c)))*n - cos(2*b*log(c))*cos(b*log(c)) - sin(2*b*l
og(c))*sin(b*log(c)) - cos(b*log(c)))*sin(b*log(x^n) + a))/(((b^2*cos(b*log(c))^2 + b^2*sin(b*log(c))^2)*n^2 +
 cos(b*log(c))^2 + sin(b*log(c))^2)*x)

________________________________________________________________________________________

Fricas [A]  time = 0.493786, size = 122, normalized size = 2.14 \begin{align*} -\frac{b n \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{{\left (b^{2} n^{2} + 1\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))/x^2,x, algorithm="fricas")

[Out]

-(b*n*cos(b*n*log(x) + b*log(c) + a) + sin(b*n*log(x) + b*log(c) + a))/((b^2*n^2 + 1)*x)

________________________________________________________________________________________

Sympy [A]  time = 32.2466, size = 286, normalized size = 5.02 \begin{align*} \begin{cases} - \frac{\log{\left (x \right )} \sin{\left (- a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 x} - \frac{i \log{\left (x \right )} \cos{\left (- a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 x} + \frac{\sin{\left (- a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 x} - \frac{\log{\left (c \right )} \sin{\left (- a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 n x} - \frac{i \log{\left (c \right )} \cos{\left (- a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 n x} & \text{for}\: b = - \frac{i}{n} \\\frac{\log{\left (x \right )} \sin{\left (a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 x} + \frac{i \log{\left (x \right )} \cos{\left (a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 x} - \frac{\sin{\left (a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 x} + \frac{\log{\left (c \right )} \sin{\left (a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 n x} + \frac{i \log{\left (c \right )} \cos{\left (a + i \log{\left (x \right )} + \frac{i \log{\left (c \right )}}{n} \right )}}{2 n x} & \text{for}\: b = \frac{i}{n} \\- \frac{b n \cos{\left (a + b n \log{\left (x \right )} + b \log{\left (c \right )} \right )}}{b^{2} n^{2} x + x} - \frac{\sin{\left (a + b n \log{\left (x \right )} + b \log{\left (c \right )} \right )}}{b^{2} n^{2} x + x} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*ln(c*x**n))/x**2,x)

[Out]

Piecewise((-log(x)*sin(-a + I*log(x) + I*log(c)/n)/(2*x) - I*log(x)*cos(-a + I*log(x) + I*log(c)/n)/(2*x) + si
n(-a + I*log(x) + I*log(c)/n)/(2*x) - log(c)*sin(-a + I*log(x) + I*log(c)/n)/(2*n*x) - I*log(c)*cos(-a + I*log
(x) + I*log(c)/n)/(2*n*x), Eq(b, -I/n)), (log(x)*sin(a + I*log(x) + I*log(c)/n)/(2*x) + I*log(x)*cos(a + I*log
(x) + I*log(c)/n)/(2*x) - sin(a + I*log(x) + I*log(c)/n)/(2*x) + log(c)*sin(a + I*log(x) + I*log(c)/n)/(2*n*x)
 + I*log(c)*cos(a + I*log(x) + I*log(c)/n)/(2*n*x), Eq(b, I/n)), (-b*n*cos(a + b*n*log(x) + b*log(c))/(b**2*n*
*2*x + x) - sin(a + b*n*log(x) + b*log(c))/(b**2*n**2*x + x), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (b \log \left (c x^{n}\right ) + a\right )}{x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))/x^2,x, algorithm="giac")

[Out]

integrate(sin(b*log(c*x^n) + a)/x^2, x)